package com.ccit.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "管理员账号")
@TableName("administrator")
public class Admin {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "管理员邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "管理员名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "管理员手机号")
    @TableField("phone")
    private String phone;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)//不返回这个字段给前端
    @ApiModelProperty(value = "管理员密码")
    @TableField("password")
    private String password;


    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)//不返回这个字段给前端
    @TableLogic//逻辑删除注解
    @ApiModelProperty(value = "账号逻辑删除,1 已删除  0 未删除")
    @TableField("deleted")
    private int deleted;

}
